***

use Persuasion_Study.dta

**************************************************************************
*Brian versus Susan agreement by policy area (Table 1)
**************************************************************************
{

*Health

summ agreement_susan_health agreement_brian_health
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
a~san_health |        823    .4872418    .5001411          0          1
a~ian_health |        823    .5127582    .5001411          0          1

*/

gen agree_diff_health = agreement_susan_health-agreement_brian_health

*null hypothesis: agreement-brian-agreement = 0
*alt  hypothesis: agreement-brian-agreement = greater than 0

ttest agree_diff_health==0 
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agree_~h |     823   -.0255164    .0348676    1.000282   -.0939565    .0429237
------------------------------------------------------------------------------
    mean = mean(agree_diff_health)                                t =  -0.7318
Ho: mean = 0                                     degrees of freedom =      822

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.2322         Pr(|T| > |t|) = 0.4645          Pr(T > t) = 0.7678
*/

*Security

summ agreement_susan_security agreement_brian_security
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agreement_.. |        802    .5124688    .5001564          0          1
agreement_.. |        802    .4875312    .5001564          0          1

*/

gen agree_diff_security = agreement_susan_security-agreement_brian_security

*null hypothesis: agreement-brian-agreement = 0
*alt  hypothesis: agreement-brian-agreement = greater than 0

ttest agree_diff_security==0 
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agree_.. |     802    .0249377    .0353223    1.000313   -.0443975    .0942728
------------------------------------------------------------------------------
    mean = mean(agree_diff_security)                              t =   0.7060
Ho: mean = 0                                     degrees of freedom =      801

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.7598         Pr(|T| > |t|) = 0.4804          Pr(T > t) = 0.2402
*/

*Tourism 

summ agreement_susan_tourism agreement_brian_tourism
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
~san_tourism |        797    .5671267    .4957846          0          1
~ian_tourism |        797    .4328733    .4957846          0          1
*/

gen agree_diff_tourism = agreement_susan_tourism-agreement_brian_tourism

*null hypothesis: agreement-brian-agreement = 0
*alt  hypothesis: agreement-brian-agreement = greater than 0

ttest agree_diff_tourism==0 
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agree_.. |     797    .1342535    .0351232    .9915693    .0653084    .2031985
------------------------------------------------------------------------------
    mean = mean(agree_diff_tourism)                               t =   3.8224
Ho: mean = 0                                     degrees of freedom =      796

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9999         Pr(|T| > |t|) = 0.0001          Pr(T > t) = 0.0001
*/
*Difference in agreement between Susan and Brian is significant for Tourism

*Birth Control

summ agreement_susan_bc agreement_brian_bc
/*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~san_bc |        817    .5128519     .500141          0          1
agree~ian_bc |        817    .4871481     .500141          0          1

*/

gen agree_diff_bc = agreement_susan_bc-agreement_brian_bc

*null hypothesis: agreement-brian-agreement = 0
*alt  hypothesis: agreement-brian-agreement = greater than 0

ttest agree_diff_bc==0 
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agree_~c |     817    .0257038    .0349954    1.000282   -.0429879    .0943955
------------------------------------------------------------------------------
    mean = mean(agree_diff_bc)                                    t =   0.7345
Ho: mean = 0                                     degrees of freedom =      816

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.7686         Pr(|T| > |t|) = 0.4629          Pr(T > t) = 0.2314
*/
}

**************************************************************************
*Brian versus Susan expertise by policy area (Table 1)
**************************************************************************
{
*Health

summ brian_expertise susan_expertise if treatment == 1
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
brian_expe~e |        823    2.743621    .9481086          1          4
susan_expe~e |        823    2.866343    .8791292          1          4
*/

gen exp_diff = brian_expertise-susan_expertise

ttest exp_diff==0 if treatment == 1
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
exp_diff |     823   -.1227217    .0434403    1.246213   -.2079887   -.0374548
------------------------------------------------------------------------------
    mean = mean(exp_diff)                                         t =  -2.8251
Ho: mean = 0                                     degrees of freedom =      822

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.0024         Pr(|T| > |t|) = 0.0048          Pr(T > t) = 0.9976
*/
*Susan seen as significantly more expert in health policy
*Sort of odd, since they aren't more likely to agree with Susan in Health

**********
*Security
summ brian_expertise susan_expertise if treatment == 2
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
brian_expe~e |        802     2.82793    .8393077          1          4
susan_expe~e |        802    2.851621    .8678923          1          4
*/

ttest exp_diff==0 if treatment == 2
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
exp_diff |     802   -.0236908    .0391485    1.108671   -.1005366     .053155
------------------------------------------------------------------------------
    mean = mean(exp_diff)                                         t =  -0.6052
Ho: mean = 0                                     degrees of freedom =      801

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.2726         Pr(|T| > |t|) = 0.5453          Pr(T > t) = 0.7274

*/

**********
*Tourism 
summ brian_expertise susan_expertise if treatment == 3
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
brian_expe~e |        797    2.801757    .9041206          1          4
susan_expe~e |        797    3.030113    .8352153          1          4

*/

ttest exp_diff==0 if treatment == 3
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
exp_diff |     797   -.2283563    .0397506    1.122206   -.3063847    -.150328
------------------------------------------------------------------------------
    mean = mean(exp_diff)                                         t =  -5.7447
Ho: mean = 0                                     degrees of freedom =      796

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

*/

*Birth control 
summ brian_expertise susan_expertise if treatment == 4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
brian_expe~e |        817    2.619339    .9942324          1          4
susan_expe~e |        817    3.097919    .8773892          1          4
*/

ttest exp_diff==0 if treatment == 4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
exp_diff |     817   -.4785802    .0509391    1.456003   -.5785673   -.3785931
------------------------------------------------------------------------------
    mean = mean(exp_diff)                                         t =  -9.3951
Ho: mean = 0                                     degrees of freedom =      816

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

*/
}

**************************************************************************
*Agreement by Partisanship (Table 2)
**************************************************************************
{
*Number of respondents
table treatment, c(mean total_repwomen mean total_repmen mean total_demwomen mean total_demmen) f(%9.2f)
/*
--------------------------------------------------------------------------
treatment | mean(total_~n)  mean(total_~n)  mean(total_~n)  mean(total_~n)
----------+---------------------------------------------------------------
        1 |         110.00          147.00          166.00          121.00
        2 |         127.00          125.00          171.00          128.00
        3 |         123.00          131.00          170.00          120.00
        4 |         106.00          162.00          185.00          121.00
--------------------------------------------------------------------------
466 Republican women, 565 Republican men, 692 Democratic women, 490 Democratic men
*/ 

*REPUBLICANS: 
{
*Health
summ agreement_reps agreement_brian_reps if treatment == 1
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        257    .5136187    .5007897          0          1
agree~n_reps |        257    .4863813    .5007897          0          1

*/

gen agreement_diff_partyreps = agreement_reps-agreement_brian_reps 

ttest agreement_diff_partyreps==0 if treatment == 1
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ag~yreps |     257    .0272374    .0624768    1.001579   -.0957966    .1502713
------------------------------------------------------------------------------
    mean = mean(agreement_diff_partyreps)                         t =   0.4360
Ho: mean = 0                                     degrees of freedom =      256

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.6684         Pr(|T| > |t|) = 0.6632          Pr(T > t) = 0.3316
*/

*Security
summ agreement_reps agreement_brian_reps if treatment == 2
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        252    .4563492    .4990822          0          1
agree~n_reps |        252    .5436508    .4990822          0          1
*/

ttest agreement_diff_partyreps==0 if treatment == 2 
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ag~yreps |     252   -.0873016    .0628784    .9981644   -.2111382     .036535
------------------------------------------------------------------------------
    mean = mean(agreement_diff_partyreps)                         t =  -1.3884
Ho: mean = 0                                     degrees of freedom =      251

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.0831         Pr(|T| > |t|) = 0.1662          Pr(T > t) = 0.9169
*/
*republicans significantly more likely to agree with Brian on Security

*Tourism 
summ agreement_reps agreement_brian_reps if treatment == 3
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        254          .5    .5009872          0          1
agree~n_reps |        254          .5    .5009872          0          1
*/

ttest agreement_diff_partyreps==0 if treatment == 3
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ag~yreps |     254           0    .0628695    1.001974   -.1238142    .1238142
------------------------------------------------------------------------------
    mean = mean(agreement_diff_partyreps)                         t =   0.0000
Ho: mean = 0                                     degrees of freedom =      253

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.5000         Pr(|T| > |t|) = 1.0000          Pr(T > t) = 0.5000
*/

summ agreement_reps agreement_brian_reps if treatment_order == 5
*he's in favor
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        122    .3688525    .4844835          0          1
agree~n_reps |        122    .6311475    .4844835          0          1

*/

summ agreement_reps agreement_brian_reps if treatment_order == 6
*she's in favor
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        132    .6212121    .4869331          0          1
agree~n_reps |        132    .3787879    .4869331          0          1
*/


*Birth Control
summ agreement_reps agreement_brian_reps if treatment == 4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        268    .4402985    .4973517          0          1
agree~n_reps |        268    .5597015    .4973517          0          1
*/

ttest agreement_diff_partyreps==0 if treatment == 4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ag~yreps |     268    -.119403    .0607612    .9947034    -.239035     .000229
------------------------------------------------------------------------------
    mean = mean(agreement_diff_partyreps)                         t =  -1.9651
Ho: mean = 0                                     degrees of freedom =      267

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.0252         Pr(|T| > |t|) = 0.0504          Pr(T > t) = 0.9748

*/

}

*DEMOCRATS:
{
*Health
summ agreement_dems agreement_brian_dems if treatment == 1
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_dems |        287    .4494774    .4983098          0          1
agree~n_dems |        287    .5505226    .4983098          0          1
*/

gen agreement_diff_party = agreement_dems-agreement_brian_dems 

ttest agreement_diff_party==0 if treatment == 1
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agreem.. |     287   -.1010453    .0588286    .9966196   -.2168372    .0147466
------------------------------------------------------------------------------
    mean = mean(agreement_diff_party)                             t =  -1.7176
Ho: mean = 0                                     degrees of freedom =      286

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.0435         Pr(|T| > |t|) = 0.0869          Pr(T > t) = 0.9565
*/

*Security
summ agreement_dems agreement_brian_dems if treatment == 2
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_dems |        299    .5785953    .4946119          0          1
agree~n_dems |        299    .4214047    .4946119          0          1
*/

ttest agreement_diff_party==0 if treatment == 2
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agreem.. |     299    .1571906    .0572083    .9892239    .0446072    .2697741
------------------------------------------------------------------------------
    mean = mean(agreement_diff_party)                             t =   2.7477
Ho: mean = 0                                     degrees of freedom =      298

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9968         Pr(|T| > |t|) = 0.0064          Pr(T > t) = 0.0032
*/

*Tourism 
summ agreement_dems agreement_brian_dems if treatment == 3
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_dems |        290    .5827586    .4939558          0          1
agree~n_dems |        290    .4172414    .4939558          0          1
*/

ttest agreement_diff_party==0 if treatment == 3
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agreem.. |     290    .1655172    .0580122    .9879117    .0513373    .2796972
------------------------------------------------------------------------------
    mean = mean(agreement_diff_party)                             t =   2.8531
Ho: mean = 0                                     degrees of freedom =      289

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9977         Pr(|T| > |t|) = 0.0046          Pr(T > t) = 0.0023
*/

*Birth Control
summ agreement_dems agreement_brian_dems if treatment == 4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_dems |        306    .5915033     .492361          0          1
agree~n_dems |        306    .4084967     .492361          0          1
*/

ttest agreement_diff_party==0 if treatment == 4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agreem.. |     306    .1830065    .0562928     .984722    .0722351     .293778
------------------------------------------------------------------------------
    mean = mean(agreement_diff_party)                             t =   3.2510
Ho: mean = 0                                     degrees of freedom =      305

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9994         Pr(|T| > |t|) = 0.0013          Pr(T > t) = 0.0006
*/
}



}

**************************************************************************
*Expertise by Partisanship (Table 2)
**************************************************************************
{
*REPUBLICANS:
{
gen expertise_diff_partyreps = susanexpertise_reps-brianexpertise_reps

summ expertise_diff_partyreps 
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
expert~yreps |      1,031    .1173618    1.276676         -3          3
*/

*Health 
summ susanexpertise_reps brianexpertise_reps if treatment == 1
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ps |        257    2.996109    .9035436          1          4
brianexpe~ps |        257     2.85214    .9730375          1          4
*/

ttest expertise_diff_partyreps==0 if treatment == 1
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ex~yreps |     257    .1439689    .0813755    1.304549   -.0162818    .3042196
------------------------------------------------------------------------------
    mean = mean(expertise_diff_partyreps)                         t =   1.7692
Ho: mean = 0                                     degrees of freedom =      256

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9610         Pr(|T| > |t|) = 0.0781          Pr(T > t) = 0.0390
*/

*Security
summ susanexpertise_reps brianexpertise_reps if treatment == 2
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ps |        252    2.896825    .8405023          1          4
brianexpe~ps |        252    2.964286    .8389867          1          4

*/

ttest expertise_diff_partyreps==0 if treatment == 2
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ex~yreps |     252   -.0674603    .0722143    1.146366   -.2096835    .0747629
------------------------------------------------------------------------------
    mean = mean(expertise_diff_partyreps)                         t =  -0.9342
Ho: mean = 0                                     degrees of freedom =      251

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.1756         Pr(|T| > |t|) = 0.3511          Pr(T > t) = 0.8244
*/

*Tourism 
summ susanexpertise_reps brianexpertise_reps if treatment == 3
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ps |        254    3.023622    .8384492          1          4
brianexpe~ps |        254     2.92126    .8856011          1          4
*/

ttest expertise_diff_partyreps==0 if treatment == 3
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ex~yreps |     254    .1023622    .0726674    1.158127   -.0407478    .2454722
------------------------------------------------------------------------------
    mean = mean(expertise_diff_partyreps)                         t =   1.4086
Ho: mean = 0                                     degrees of freedom =      253

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9199         Pr(|T| > |t|) = 0.1602          Pr(T > t) = 0.0801
*/

*Birth Control
summ susanexpertise_reps brianexpertise_reps if treatment == 4
/*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ps |        268     3.05597    .9121741          1          4
brianexpe~ps |        268    2.776119    .9840815          1          4
*/

ttest expertise_diff_partyreps==0 if treatment == 4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
ex~yreps |     268    .2798507    .0883077    1.445659    .1059828    .4537187
------------------------------------------------------------------------------
    mean = mean(expertise_diff_partyreps)                         t =   3.1690
Ho: mean = 0                                     degrees of freedom =      267

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9991         Pr(|T| > |t|) = 0.0017          Pr(T > t) = 0.0009
*/
}

*DEMOCRATS:
{
gen expertise_diff_party = susanexpertise_dems-brianexpertise_dems

summ expertise_diff_party
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
exper~_party |      1,182    .2927242    1.325423         -3          3
*/

*Health 
summ susanexpertise_dems brianexpertise_dems if treatment == 1
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ms |        287    2.839721    .8862334          1          4
brianexpe~ms |        287    2.728223    .9943923          1          4

*/

ttest expertise_diff_party==0 if treatment == 1
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
e~_party |     287    .1114983     .077455     1.31217   -.0409558    .2639523
------------------------------------------------------------------------------
    mean = mean(expertise_diff_party)                             t =   1.4395
Ho: mean = 0                                     degrees of freedom =      286

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9245         Pr(|T| > |t|) = 0.1511          Pr(T > t) = 0.0755
*/

*Security
summ susanexpertise_dems brianexpertise_dems if treatment == 2
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ms |        299    2.926421     .912959          1          4
brianexpe~ms |        299     2.83612    .8649978          1          4
*/

ttest expertise_diff_party==0 if treatment == 2
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
e~_party |     299     .090301    .0668812    1.156484   -.0413183    .2219203
------------------------------------------------------------------------------
    mean = mean(expertise_diff_party)                             t =   1.3502
Ho: mean = 0                                     degrees of freedom =      298

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9110         Pr(|T| > |t|) = 0.1780          Pr(T > t) = 0.0890

*/

*Tourism 
summ susanexpertise_dems brianexpertise_dems if treatment == 3
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ms |        290    3.062069    .8378642          1          4
brianexpe~ms |        290    2.727586     .917872          1          4
*/

ttest expertise_diff_party==0 if treatment == 3
/*
One-sample t test
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
e~_party |     290    .3344828    .0698196    1.188985    .1970633    .4719022
------------------------------------------------------------------------------
    mean = mean(expertise_diff_party)                             t =   4.7907
Ho: mean = 0                                     degrees of freedom =      289

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
*/

*Birth Control
summ susanexpertise_dems brianexpertise_dems if treatment == 4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
susanexpe~ms |        306    3.137255    .8875003          1          4
brianexpe~ms |        306     2.51634    1.024964          1          4
*/

ttest expertise_diff_party==0 if treatment == 4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
e~_party |     306     .620915    .0878342     1.53647    .4480774    .7937527
------------------------------------------------------------------------------
    mean = mean(expertise_diff_party)                             t =   7.0692
Ho: mean = 0                                     degrees of freedom =      305

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

*/
}





}



*Support among Republicans when Brian or Susan endorses OTCBC (page 11, paragraph 1)
{
summ agreement_reps agreement_brian_reps if treatment_order == 7
*Support among Republicans when Brian endorses OTCBC
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        139    .3741007    .4856399          0          1
agree~n_reps |        139    .6258993    .4856399          0          1
*/

summ agreement_reps agreement_brian_reps if treatment_order == 8
*Support among Republicans when Susan endorses OTCBC
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_reps |        129    .5116279    .5018136          0          1
agree~n_reps |        129    .4883721    .5018136          0          1
*/

*Page 11 - Support among Democrats when Brian or Susan endorses OTCBC
summ agreement_dems agreement_brian_dems if treatment_order == 7
*Support among Republicans when Brian endorses OTCBC
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_dems |        144    .3263889    .4705281          0          1
agree~n_dems |        144    .6736111    .4705281          0          1
*/

summ agreement_dems agreement_brian_dems if treatment_order == 8
*Support among Republicans when Susan endorses OTCBC
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agree~t_dems |        162    .8271605    .3792809          0          1
agree~n_dems |        162    .1728395    .3792809          0          1
*/
}

*Differences in expertise between parties (page 11, paragraph 2)
{
gen expertise_diff = susan_expertise-brian_expertise

*Republicans:
summ expertise_diff if party_dichotomous == 1
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
expertise_~f |      1,031    .1173618    1.276676         -3          3
*/

*Democrats:
summ expertise_diff if party_dichotomous == 0
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
expertise_~f |      1,182    .2927242    1.325423         -3          3
*/

ttest expertise_diff, by(party_dichotomous)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |   1,182    .2927242    .0385519    1.325423    .2170863     .368362
       1 |   1,031    .1173618    .0397605    1.276676     .039341    .1953825
---------+--------------------------------------------------------------------
combined |   2,213    .2110258    .0277532    1.305582    .1566007    .2654508
---------+--------------------------------------------------------------------
    diff |            .1753624    .0555236                .0664786    .2842462
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   3.1583
Ho: diff = 0                                     degrees of freedom =     2211

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9992         Pr(|T| > |t|) = 0.0016          Pr(T > t) = 0.0008
*/
}


*Support for OTCBC by party, gender, and speaker in favor (Figure 2 and Page 12-13)
{
*Democratic women:
mean favor_oppose_otcbc if party_dichotomous == 0 & treatment_order == 7 & gender == 1
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .6373626   .0506767      .5366845    .7380407
--------------------------------------------------------------------
*/
mean favor_oppose_otcbc if party_dichotomous == 0 & treatment_order == 8 & gender == 1
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .7659574   .0439044       .678772    .8531429
--------------------------------------------------------------------
*/
*Democratic women support of OTCBC is 63% when Brian endorses it and 76.5% when Susan endorses it

*Democratic men:
*when Brian endorses OTCBC
mean favor_oppose_otcbc if party_dichotomous == 0 & treatment_order == 7 & gender == 0
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .7358491   .0611391      .6131646    .8585336
--------------------------------------------------------------------
*/

*when Susan endorses OTCBC
mean favor_oppose_otcbc if party_dichotomous == 0 & treatment_order == 8 & gender == 0
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .9117647   .0346517      .8425995    .9809299
--------------------------------------------------------------------
*/

*Republican men:
*when Brian endorses OTCBC
mean favor_oppose_otcbc if party_dichotomous == 1 & treatment_order == 7 & gender == 0
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .5802469    .055177      .4704411    .6900527
--------------------------------------------------------------------
*/

*when Susan endorses OTCBC
mean favor_oppose_otcbc if party_dichotomous == 1 & treatment_order == 8 & gender == 0
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .5185185   .0558633      .4073469    .6296901
--------------------------------------------------------------------
*/

*Republican women:
*when Brian endorses OTCBC
mean favor_oppose_otcbc if party_dichotomous == 1 & treatment_order == 7 & gender == 1
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |   .6896552   .0612775      .5669492    .8123612
--------------------------------------------------------------------
*/

*when Susan endorses OTCBC
mean favor_oppose_otcbc if party_dichotomous == 1 & treatment_order == 8 & gender == 1
/*
--------------------------------------------------------------------
                   |       Mean   Std. Err.     [95% Conf. Interval]
-------------------+------------------------------------------------
favor_oppose_otcbc |         .5   .0729325      .3532787    .6467213
--------------------------------------------------------------------
*/

gen treatment_order_bc = .
replace treatment_order_bc = 1 if treatment_order == 7
replace treatment_order_bc = 0 if treatment_order == 8

gen favor_oppose_otcbcrepwomen = .
replace favor_oppose_otcbcrepwomen = favor_oppose_otcbc if party_dichotomous == 1 & gender == 1

gen favor_oppose_otcbcrepmen = .
replace favor_oppose_otcbcrepmen = favor_oppose_otcbc if party_dichotomous == 1 & gender == 0

gen favor_oppose_otcbcdemwomen = .
replace favor_oppose_otcbcdemwomen = favor_oppose_otcbc if party_dichotomous == 0 & gender == 1

gen favor_oppose_otcbcdemmen = .
replace favor_oppose_otcbcdemmen = favor_oppose_otcbc if party_dichotomous == 0 & gender == 0

ttest favor_oppose_otcbcrepwomen, by(treatment_order_bc)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      48          .5    .0729325    .5052912    .3532787    .6467213
       1 |      58    .6896552    .0612775    .4666753    .5669492    .8123612
---------+--------------------------------------------------------------------
combined |     106    .6037736    .0477325    .4914361    .5091289    .6984183
---------+--------------------------------------------------------------------
    diff |           -.1896552    .0945408               -.3771331   -.0021772
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -2.0061
Ho: diff = 0                                     degrees of freedom =      104

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0237         Pr(|T| > |t|) = 0.0474          Pr(T > t) = 0.9763

*/

ttest favor_oppose_otcbcrepmen, by(treatment_order_bc)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      81    .5185185    .0558633    .5027701    .4073469    .6296901
       1 |      81    .5802469     .055177    .4965933    .4704411    .6900527
---------+--------------------------------------------------------------------
combined |     162    .5493827    .0392129    .4990982    .4719448    .6268206
---------+--------------------------------------------------------------------
    diff |           -.0617284    .0785189               -.2167955    .0933387
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.7862
Ho: diff = 0                                     degrees of freedom =      160

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2165         Pr(|T| > |t|) = 0.4329          Pr(T > t) = 0.7835
*/

ttest favor_oppose_otcbcdemwomen, by(treatment_order_bc)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      94    .7659574    .0439044    .4256692     .678772    .8531429
       1 |      91    .6373626    .0506767    .4834249    .5366845    .7380407
---------+--------------------------------------------------------------------
combined |     185    .7027027    .0336955    .4583089    .6362234     .769182
---------+--------------------------------------------------------------------
    diff |            .1285948     .066912               -.0034233    .2606129
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.9219
Ho: diff = 0                                     degrees of freedom =      183

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9719         Pr(|T| > |t|) = 0.0562          Pr(T > t) = 0.0281
*/

ttest favor_oppose_otcbcdemmen, by(treatment_order_bc)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      68    .9117647    .0346517    .2857456    .8425995    .9809299
       1 |      53    .7358491    .0611391    .4450991    .6131646    .8585336
---------+--------------------------------------------------------------------
combined |     121    .8347107    .0339078    .3729859    .7675756    .9018458
---------+--------------------------------------------------------------------
    diff |            .1759156    .0667078                .0438275    .3080038
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   2.6371
Ho: diff = 0                                     degrees of freedom =      119

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9953         Pr(|T| > |t|) = 0.0095          Pr(T > t) = 0.0047
*/
}







***************************************************************
*Analysis of Open-Ended Responses 
***************************************************************
***Explanation (Page 15 in manuscript)
{
*Create dummy variables for whether they provided an explanation
{
gen explanation = 0 
replace explanation = 1 if !missing(explain_health_1)
replace explanation = 1 if !missing(explain_health_2)
replace explanation = 1 if !missing(explain_security_1)
replace explanation = 1 if !missing(explain_security_2)
replace explanation = 1 if !missing(explain_tourism_1)
replace explanation = 1 if !missing(explain_tourism_2)
replace explanation = 1 if !missing(explain_otcbc_1)
replace explanation = 1 if !missing(explain_otcbc_2)

gen explanation_repwomen = explanation if gender == 1 & party_dichotomous == 1 
gen explanation_repmen = explanation if gender == 0 & party_dichotomous == 1 
gen explanation_demwomen = explanation if gender == 1 & party_dichotomous == 0
gen explanation_demmen = explanation if gender == 0 & party_dichotomous == 0

gen explanation_health1 = 0
replace explanation_health1 = 1 if !missing(explain_health_1)
order explanation_health1, after(explain_health_1)
replace explanation_health1 = . if treatment_order !=1

gen explanation_health2 = 0
replace explanation_health2 = 1 if !missing(explain_health_2)
order explanation_health2, after(explain_health_2)
replace explanation_health2 = . if treatment_order !=2

egen health_explanation = rowtotal(explanation_health1 explanation_health2)
replace health_explanation = . if treatment !=1
**

gen explanation_security1 = 0
replace explanation_security1 = 1 if !missing(explain_security_1)
order explanation_security1, after(explain_security_1)
replace explanation_security1 = . if treatment_order !=3


gen explanation_security2 = 0
replace explanation_security2 = 1 if !missing(explain_security_2)
order explanation_security2, after(explain_security_2)
replace explanation_security2 = . if treatment_order !=4

egen security_explanation = rowtotal(explanation_security1 explanation_security2)
replace security_explanation = . if treatment !=2

**

gen explanation_tourism1 = 0
replace explanation_tourism1 = 1 if !missing(explain_tourism_1)
order explanation_tourism1, after(explain_tourism_1)
replace explanation_tourism1 = . if treatment_order !=5

gen explanation_tourism2 = 0
replace explanation_tourism2 = 1 if !missing(explain_tourism_2)
order explanation_tourism2, after(explain_tourism_2)
replace explanation_tourism2 = . if treatment_order !=6

egen tourism_explanation = rowtotal(explanation_tourism1 explanation_tourism2)
replace tourism_explanation = . if treatment !=3

**

gen explanation_otcbc1 = 0
replace explanation_otcbc1 = 1 if !missing(explain_otcbc_1)
order explanation_otcbc1, after(explain_otcbc_1)
replace explanation_otcbc1 = . if treatment_order !=7

gen explanation_otcbc2 = 0
replace explanation_otcbc2 = 1 if !missing(explain_otcbc_2)
order explanation_otcbc2, after(explain_otcbc_2)
replace explanation_otcbc2 = . if treatment_order !=8
 
egen otcb_explanation = rowtotal(explanation_otcbc1 explanation_otcbc2)
replace otcb_explanation = . if treatment !=4

gen health_explanation1 = . 
replace health_explanation1 = 1 if health_explanation == 1
gen security_explanation1 = . 
replace security_explanation1 = 1 if security_explanation == 1
gen tourism_explanation1 = . 
replace tourism_explanation1 = 1 if tourism_explanation == 1
gen otcb_explanation1 = . 
replace otcb_explanation1 = 1 if otcb_explanation == 1
}


}
*T-tests to see if word count is significantly higher for Republican women (Page 15 in Manuscript)
{
*Create word count variable
{
gen health1_wordcount=wordcount(explain_health_1)
replace health1_wordcount = . if treatment_order !=1
gen health2_wordcount=wordcount(explain_health_2)
replace health2_wordcount = . if treatment_order !=2

egen health_wordcount = rowtotal(health1_wordcount health2_wordcount)
replace health_wordcount = . if treatment !=1
replace health_wordcount = . if health_wordcount == 0

gen security1_wordcount=wordcount(explain_security_1)
replace security1_wordcount = . if treatment_order !=3
gen security2_wordcount=wordcount(explain_security_2)
replace security2_wordcount = . if treatment_order !=4

egen security_wordcount = rowtotal(security1_wordcount security2_wordcount)
replace security_wordcount = . if treatment !=2
replace security_wordcount = . if security_wordcount == 0

gen tourism1_wordcount=wordcount(explain_tourism_1)
replace tourism1_wordcount = . if treatment_order !=5
gen tourism2_wordcount=wordcount(explain_tourism_2)
replace tourism2_wordcount = . if treatment_order !=6

egen tourism_wordcount = rowtotal(tourism1_wordcount tourism2_wordcount)
replace tourism_wordcount = . if treatment !=3
replace tourism_wordcount = . if tourism_wordcount == 0

gen otcb1_wordcount=wordcount(explain_otcbc_1)
replace otcb1_wordcount = . if treatment_order !=7
gen otcb2_wordcount=wordcount(explain_otcbc_2)
replace otcb2_wordcount = . if treatment_order !=8

egen otcb_wordcount = rowtotal(otcb1_wordcount otcb2_wordcount)
replace otcb_wordcount = . if treatment !=4
replace otcb_wordcount = . if otcb_wordcount == 0

egen repwomen_wordcount = rowtotal(health_wordcount security_wordcount tourism_wordcount otcb_wordcount) if female_republican_dummy == 1
replace repwomen_wordcount = . if repwomen_wordcount == 0
}

*Compared to all other policy areas:
gen repwomen_otcb = .
replace repwomen_otcb = 0 if female_republican_dummy == 1
replace repwomen_otcb = 1 if treatment == 4 & female_republican_dummy == 1

ttest repwomen_wordcount, by(repwomen_otcb) 
*page 15 in manuscript
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     234    14.49145    .9643177    14.75123    12.59156    16.39135
       1 |      73    18.65753    2.448419     20.9193     13.7767    23.53837
---------+--------------------------------------------------------------------
combined |     307    15.48208    .9409479    16.48674    13.63054    17.33363
---------+--------------------------------------------------------------------
    diff |           -4.166081    2.200946               -8.497042    .1648794
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.8929
Ho: diff = 0                                     degrees of freedom =      305

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0297         Pr(|T| > |t|) = 0.0593          Pr(T > t) = 0.9703
*/
*significantly more words in BC than in all other categories


*Compared to other groups:
egen repmen_wordcount = rowtotal(health_wordcount security_wordcount tourism_wordcount otcb_wordcount) if male_republican_dummy == 1
replace repmen_wordcount = . if repmen_wordcount == 0
egen demwomen_wordcount = rowtotal(health_wordcount security_wordcount tourism_wordcount otcb_wordcount) if female_democrat_dummy == 1
replace demwomen_wordcount = . if demwomen_wordcount == 0
egen demmen_wordcount = rowtotal(health_wordcount security_wordcount tourism_wordcount otcb_wordcount) if male_democrat_dummy == 1
replace demmen_wordcount = . if demmen_wordcount == 0 

gen repwomen_otcb_dummy = .
replace repwomen_otcb_dummy = 1 if treatment == 4 & female_republican_dummy == 1
replace repwomen_otcb_dummy = 0 if treatment == 4 & male_republican_dummy == 1
replace repwomen_otcb_dummy = 0 if treatment == 4 & female_democrat_dummy == 1
replace repwomen_otcb_dummy = 0 if treatment == 4 & male_democrat_dummy == 1

ttest otcb_wordcount, by(repwomen_otcb_dummy) 
*Page 15 in manuscript
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     381    14.37795    .7053932    13.76873    12.99099    15.76492
       1 |      73    18.65753    2.448419     20.9193     13.7767    23.53837
---------+--------------------------------------------------------------------
combined |     454    15.06608    .7134017    15.20065    13.66409    16.46807
---------+--------------------------------------------------------------------
    diff |           -4.279581    1.933774               -8.079884   -.4792785
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -2.2131
Ho: diff = 0                                     degrees of freedom =      452

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0137         Pr(|T| > |t|) = 0.0274          Pr(T > t) = 0.9863
*/

}





***************************************************************
*Appendix
***************************************************************

*Support Levels for Position that Birth Control should be Available OTC (Appendix 4, Table 4)
{

*party_gender:
*1 = republican women, 2 = republican men, 3 = democratic women, 4 = democratic men 

gen favor_oppose_otcbc7 = favor_oppose_otcbc if treatment_order == 7
gen favor_oppose_otcbc8 = favor_oppose_otcbc if treatment_order == 8

tabulate party_gender, summarize(favor_oppose_otcbc7) 
*he's saying it should be over the counter
/*
party_gende |   Summary of favor_oppose_otcbc7
          r |        Mean   Std. Dev.       Freq.
------------+------------------------------------
          1 |   .68965517   .46667531          58
          2 |   .58024691   .49659333          81
          3 |   .63736264    .4834249          91
          4 |   .73584906    .4450991          53
------------+------------------------------------
      Total |   .65017668   .47775885         283
*/

tabulate party_gender, summarize(favor_oppose_otcbc8) 
*she's saying it should be over the counter
/*
party_gende |   Summary of favor_oppose_otcbc8
          r |        Mean   Std. Dev.       Freq.
------------+------------------------------------
          1 |          .5   .50529115          48
          2 |   .51851852    .5027701          81
          3 |   .76595745   .42566916          94
          4 |   .91176471   .28574564          68
------------+------------------------------------
      Total |   .68728522   .46439785         291
*/

*Republican Women 
*party_gender 1 = republican women, 2 = republican men, 3 = democratic women, 4 = democratic men 

*Is support for the position significantly greater when it is endorsed by Brian, among Republican women?

gen favor_oppose_otcbcrepwomen = .
replace favor_oppose_otcbcrepwomen = favor_oppose_otcbc if party_gender == 1

gen oppose_favor_otcbcrepwomen = .
replace oppose_favor_otcbcrepwomen = oppose_favor_otcbc if party_gender == 1

gen treatment_order_bc = .
replace treatment_order_bc = 1 if treatment_order == 7
replace treatment_order_bc = 0 if treatment_order == 8

ttest favor_oppose_otcbcrepwomen, by(treatment_order_bc)
*yes

*Republican men 
*Is support for the position significantly greater when it is endorsed by Brian, among Republican men?
gen favor_oppose_otcbcrepmen = .
replace favor_oppose_otcbcrepmen = favor_oppose_otcbc if party_gender == 2

gen oppose_favor_otcbcrepmen = .
replace oppose_favor_otcbcrepmen = oppose_favor_otcbc if party_gender == 2

ttest favor_oppose_otcbcrepmen, by(treatment_order_bc)
*no significant differences for Republican men

*Democratic women
gen favor_oppose_otcbcdemwomen = .
replace favor_oppose_otcbcdemwomen = favor_oppose_otcbc if party_gender == 3

ttest favor_oppose_otcbcdemwomen, by(treatment_order_bc)
*Democratic women  are significantly more likely to support the policy when it is endorsed by Susan


*Democratic men
gen favor_oppose_otcbcdemmen = .
replace favor_oppose_otcbcdemmen = favor_oppose_otcbc if party_gender == 4

ttest favor_oppose_otcbcdemmen, by(treatment_order_bc)
*Democratic men significantly more likely to support the policy when it is endorsed by Susan

*Differences in differences (Appendix 4, Table 4 and discussion on page 13)
{
reg favor_oppose_otcbc treat8rm treat7rw treat8rw treat7dw treat7dw treat7dm treat8dm
test treat7rw-treat8rw=treat8rm
/*
treat8rm + treat7rw - treat8rw = 0

       F(  1,   810) =    7.46
            Prob > F =    0.0064
*/

reg favor_oppose_otcbc treat7rm treat8rm treat7rw treat8rw treat7dw treat8dw treat8dm
test treat7dw-treat8dw=treat8dm
/*
F(  1,   809) =   21.05
            Prob > F =    0.0000
*/
}
}


*Analysis of Independents (Appendix 5, Table 5 in Manuscript)
{

gen agreebrian_ind_wom = .
replace agreebrian_ind_wom = agreement_brian if republican == 4 & gender == 1
gen agreesusan_ind_wom = .
replace agreesusan_ind_wom = agreement if republican == 4 & gender == 1

gen agreebrian_ind_men = .
replace agreebrian_ind_men = agreement_brian if republican == 4 & gender == 0
gen agreesusan_ind_men = .
replace agreesusan_ind_men = agreement if republican == 4 & gender == 0

gen agreediff_ind_wom = agreesusan_ind_wom-agreebrian_ind_wom
gen agreediff_ind_men = agreesusan_ind_men-agreebrian_ind_men

*BC
summ agreebrian_ind_wom agreesusan_ind_wom if treatment==4
/*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agreebrian~m |         52    .3653846    .4862359          0          1
agreesusan~m |         52    .6346154    .4862359          0          1
*/

ttest agreediff_ind_wom==0 if treatment==4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agreed~m |      52    .2692308    .1348576    .9724718   -.0015071    .5399686
------------------------------------------------------------------------------
    mean = mean(agreediff_ind_wom)                                t =   1.9964
Ho: mean = 0                                     degrees of freedom =       51

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9744         Pr(|T| > |t|) = 0.0512          Pr(T > t) = 0.0256
*/

summ agreebrian_ind_men agreesusan_ind_men if treatment==4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
agreebrian~n |         41    .5853659     .498779          0          1
agreesusan~n |         41    .4146341     .498779          0          1
*/

ttest agreediff_ind_men==0 if treatment==4
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
agreed~n |      41   -.1707317    .1557924     .997558   -.4855999    .1441364
------------------------------------------------------------------------------
    mean = mean(agreediff_ind_men)                                t =  -1.0959
Ho: mean = 0                                     degrees of freedom =       40

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.1398         Pr(|T| > |t|) = 0.2797          Pr(T > t) = 0.8602
*/

gen expertisebrian_ind_wom = .
replace expertisebrian_ind_wom = brian_expertise if republican == 4 & gender == 1
gen expertisesusan_ind_wom = .
replace expertisesusan_ind_wom = susan_expertise if republican == 4 & gender == 1

gen expertisebrian_ind_men = .
replace expertisebrian_ind_men = brian_expertise if republican == 4 & gender == 0
gen expertisesusan_ind_men = .
replace expertisesusan_ind_men = susan_expertise if republican == 4 & gender == 0

gen expdiff_ind_wom = expertisesusan_ind_wom-expertisebrian_ind_wom
gen expdiff_ind_men = expertisesusan_ind_men-expertisebrian_ind_men

summ expertisesusan_ind_wom expertisebrian_ind_wom if treatment == 4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
expertises.. |         52    3.211538    .8245388          1          4
expertiseb.. |         52    2.461538    1.018679          1          4
*/

ttest expdiff_ind_wom == 0

summ expertisesusan_ind_men expertisebrian_ind_men if treatment == 4
/*
    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
expertises~n |         41     3.02439    .8799945          1          4
expertiseb~n |         41    2.536585    .9771786          1          4
*/

ttest expdiff_ind_men == 0
/*
------------------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
expdif~n |     200        .175    .0761635    1.077115    .0248089    .3251911
------------------------------------------------------------------------------
    mean = mean(expdiff_ind_men)                                  t =   2.2977
Ho: mean = 0                                     degrees of freedom =      199

    Ha: mean < 0                 Ha: mean != 0                 Ha: mean > 0
 Pr(T < t) = 0.9887         Pr(|T| > |t|) = 0.0226          Pr(T > t) = 0.0113
*/
}

*Number of Respondents by Party and Gender in Each Treatment Condition (Appendix 6, Table 6 in Manuscript)
{
*Create variable 
bysort treatment : egen total_repwomen=sum(female_republican_dummy)
bysort treatment : egen total_repmen=sum(male_republican_dummy)
bysort treatment : egen total_demwomen=sum(female_democrat_dummy)
bysort treatment : egen total_demmen=sum(male_democrat_dummy)

table treatment, c(mean total_repwomen mean total_repmen mean total_demwomen mean total_demmen) f(%9.2f)
/*
--------------------------------------------------------------------------
treatment | mean(total_~n)  mean(total_~n)  mean(total_~n)  mean(total_~n)
----------+---------------------------------------------------------------
        1 |         110.00          147.00          166.00          121.00
        2 |         127.00          125.00          171.00          128.00
        3 |         123.00          131.00          170.00          120.00
        4 |         106.00          162.00          185.00          121.00
--------------------------------------------------------------------------
*/
}

*Percentage of Respondents Providing Explanation by Condition, Party, and Gender (Appendix 6, Table 6 in Manuscript)
{
*Create variables
gen health_expl_repwomen = health_explanation1 if female_republican_dummy == 1
gen health_expl_repmen = health_explanation1 if male_republican_dummy == 1
gen health_expl_demwomen = health_explanation1 if female_democrat_dummy == 1
gen health_expl_demmen = health_explanation1 if male_democrat_dummy == 1

gen security_expl_repwomen = security_explanation1 if female_republican_dummy == 1
gen security_expl_repmen = security_explanation1 if male_republican_dummy == 1
gen security_expl_demwomen = security_explanation1 if female_democrat_dummy == 1
gen security_expl_demmen = security_explanation1 if male_democrat_dummy == 1

gen tourism_expl_repwomen = tourism_explanation1 if female_republican_dummy == 1
gen tourism_expl_repmen = tourism_explanation1 if male_republican_dummy == 1
gen tourism_expl_demwomen = tourism_explanation1 if female_democrat_dummy == 1
gen tourism_expl_demmen = tourism_explanation1 if male_democrat_dummy == 1

gen otcbc_expl_repwomen = otcb_explanation1 if female_republican_dummy == 1
gen otcbc_expl_repmen = otcb_explanation1 if male_republican_dummy == 1
gen otcbc_expl_demwomen = otcb_explanation1 if female_democrat_dummy == 1
gen otcbc_expl_demmen = otcb_explanation1 if male_democrat_dummy == 1

bysort treatment : egen total_repwomen_explanation=sum(explanation_repwomen)
bysort treatment : egen total_repmen_explanation=sum(explanation_repmen)
bysort treatment : egen total_demwomen_explanation=sum(explanation_demwomen)
bysort treatment : egen total_demmen_explanation=sum(explanation_demmen)

generate pct_explanation_repwomen = total_repwomen_explanation/total_repwomen*100
generate pct_explanation_repmen = total_repmen_explanation/total_repmen*100
generate pct_explanation_demwomen = total_demwomen_explanation/total_demwomen*100
generate pct_explanation_demmen = total_demmen_explanation/total_demmen*100

*Percentage of respondents providing explanation (Appendix 6, Table 6 in Manuscript)
table treatment, c(mean pct_explanation_repwomen mean pct_explanation_repmen mean pct_explanation_demwomen mean pct_explanation_demmen) f(%9.2f)
/*
--------------------------------------------------------------------------
treatment | mean(pct_ex~n)  mean(pct_ex~n)  mean(pct_ex~n)  mean(pct_ex~n)
----------+---------------------------------------------------------------
        1 |          67.27           85.03           75.90           83.47 
        2 |          65.35           83.20           71.93           86.72
        3 |          62.60           82.44           67.06           75.83
        4 |          68.87           86.42           72.97           87.60
--------------------------------------------------------------------------
*/
}

*Word Count by Party, Gender, and Treatment Condition (Appendix 6, Table 7 in Manuscript)
{
table party_gender, c(mean health_wordcount mean security_wordcount mean tourism_wordcount mean otcb_wordcount) f(%9.2f)
/*
--------------------------------------------------------------------------
party_gen |
der       | mean(health~t)  mean(securi~t)  mean(touris~t)  mean(otcb_w~t)
----------+---------------------------------------------------------------
        1 |          17.47           13.66           12.52           18.66    *Republican women
        2 |          11.86           10.87            9.81           13.55    *Republican men
        3 |          18.94           13.94           11.06           16.27    *Democratic women
        4 |          11.98           12.02            9.86           13.07    *Democratic men
--------------------------------------------------------------------------
*/
}

*Content analysis of open-ended responses (page 14-15)
{

use open_ended.dta, clear

count if MentionSpeakerGender == 1
*3, so .69% of total
count if Citespecificpointinsupport == 1
*150, so about 35% of total
count if MentionSpeaker == 1
*62, so about 14% of total

table Party, c(sum MentionSpeaker) f(%9.2f)

table Party, c(sum positive_brian sum positive_susan sum MentionSpeaker) f(%9.2f)
/*
-------------------------------------------------------
    Party | sum(positi~n)  sum(positi~n)  sum(Mentio~r)
----------+--------------------------------------------
        D |          5.00          17.00          36.00 = 47% for Susan, 14% for Brian
        R |          8.00           4.00          26.00 = 15% for Susan, 31% for Brian
-------------------------------------------------------
*/

ttest positive_susan, by(republican_dummy)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     236    .0720339    .0168656    .2590935    .0388069    .1052609
       1 |     197    .0203046    .0100743    .1413994    .0004366    .0401725
---------+--------------------------------------------------------------------
combined |     433    .0484988    .0103354    .2150663    .0281849    .0688128
---------+--------------------------------------------------------------------
    diff |            .0517293    .0206293                .0111827     .092276
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   2.5076
Ho: diff = 0                                     degrees of freedom =      431

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9937         Pr(|T| > |t|) = 0.0125          Pr(T > t) = 0.0063
*/

table Party, c(sum negative_brian sum negative_susan sum MentionSpeaker) f(%9.2f)

/*
-------------------------------------------------------
    Party | sum(negati~n)  sum(negati~n)  sum(Mentio~r)
----------+--------------------------------------------
        D |          4.00           1.00          36.00 11% for Brian, 5% for Susan
        R |          0.00           2.00          26.00 0% for Brian, 8% for Susan
-------------------------------------------------------
*/

ttest negative_brian, by(republican_dummy)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     236    .0169492    .0084203    .1293552    .0003602    .0335381
       1 |     197           0           0           0           0           0
---------+--------------------------------------------------------------------
combined |     433    .0092379    .0046029    .0957796    .0001911    .0182847
---------+--------------------------------------------------------------------
    diff |            .0169492    .0092179               -.0011686    .0350669
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   1.8387
Ho: diff = 0                                     degrees of freedom =      431

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9667         Pr(|T| > |t|) = 0.0666          Pr(T > t) = 0.0333
*/

count if PersonalExperience == 1
*10, so about 2.5%

count if PersonalExperience == 1 & democrat_dummy == 1
*8 out of 233, so about 3.4%

count if PersonalExperience == 1 & democrat_dummy == 1 & gender == 1
*all 8 are women
count if democrat_dummy == 1 & gender == 1
*133, so about 6%

gen female_democrat = .
replace female_democrat = 1 if democrat_dummy == 1 & gender == 1
replace female_democrat = 0 if democrat_dummy == 1 & gender == 0

ttest PersonalExperience, by(female_democrat)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     100           0           0           0           0           0
       1 |     133    .0601504    .0206948    .2386642     .019214    .1010868
---------+--------------------------------------------------------------------
combined |     233    .0343348    .0119546    .1824796    .0107812    .0578883
---------+--------------------------------------------------------------------
    diff |           -.0601504    .0238792               -.1071993   -.0131014
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -2.5189
Ho: diff = 0                                     degrees of freedom =      231

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0062         Pr(|T| > |t|) = 0.0124          Pr(T > t) = 0.9938
*/

count if PersonalExperience == 1 & republican_dummy == 1
*2 out of 197
count if PersonalExperience == 1 & republican_dummy == 1 & gender == 1
*1 Republican woman
count if republican_dummy == 1 & gender == 1
*1 out of 69 Republican women, so 1.5%

gen female_partydummy = .
replace female_partydummy = 1 if gender == 1 & democrat_dummy == 1
replace female_partydummy = 0 if gender == 1 & republican_dummy == 1

ttest PersonalExperience, by(female_partydummy)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      69    .0144928    .0144928    .1203859   -.0144271    .0434126
       1 |     133    .0601504    .0206948    .2386642     .019214    .1010868
---------+--------------------------------------------------------------------
combined |     202    .0445545    .0145529     .206836    .0158585    .0732505
---------+--------------------------------------------------------------------
    diff |           -.0456576    .0305935               -.1059849    .0146697
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.4924
Ho: diff = 0                                     degrees of freedom =      200

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0686         Pr(|T| > |t|) = 0.1372          Pr(T > t) = 0.9314
*/

gen female_republican = .
replace female_republican = 1 if gender == 1 & republican_dummy == 1
replace female_republican = 0 if gender == 0 & republican_dummy == 1

ttest PersonalExperience, by(female_republican)
/*
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     128    .0078125    .0078125    .0883883    -.007647     .023272
       1 |      69    .0144928    .0144928    .1203859   -.0144271    .0434126
---------+--------------------------------------------------------------------
combined |     197    .0101523    .0071604    .1005012   -.0039691    .0242736
---------+--------------------------------------------------------------------
    diff |           -.0066803    .0150406               -.0363434    .0229829
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.4441
Ho: diff = 0                                     degrees of freedom =      195

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3287         Pr(|T| > |t|) = 0.6574          Pr(T > t) = 0.6713
*/
}
























**************************************************************************
*Figures 3, 4, and 5
**************************************************************************
{
*Figure 4 - Health
*favor_oppose_healthbrian = he's saying it should be mandatory
*favor_oppose_healthsusan = she's saying it should be mandatory
*gender2 = male = 1, female = 0

graph bar (mean) favor_oppose_healthbrian (mean) favor_oppose_healthsusan, ///
over(gender2) over(party_dichotomous) ascategory asyvars bar(1, fcolor(navy*.3)) bar(2, fcolor(maroon*.7)) bargap(1.0) ///
legend(order(1 "Brian in Favor" 2 "Susan in Favor")) ///
ytitle(Support for Mandatory Vaccinations) ylabel(, valuelabel)
graph save Graph "/Users/georgianilsson/Desktop/Vanderbilt/RA/RA Amanda/Voice Project/Replication Files/figure4.gph"
*additional editing for gender and party labels in graph editor (women, then men on grpaxis; democrats then republicans on supaxis)

*Figure 3 - Security
*favor_oppose_securitybrian = he's saying funding should go to state & local LE
*favor_oppose_securitysusan = she's saying funding should go to state & local LE

graph bar (mean) favor_oppose_securitybrian (mean) favor_oppose_securitysusan, ///
over(gender2) over(party_dichotomous) ascategory asyvars bar(1, fcolor(navy*.3)) bar(2, fcolor(maroon*.7)) bargap(1.0) ///
legend(order(1 "Brian in Favor" 2 "Susan in Favor")) ///
ytitle(Support for Funding to State and Local LE) ylabel(, valuelabel)
graph save Graph "/Users/georgianilsson/Desktop/Vanderbilt/RA/RA Amanda/Voice Project/Replication Files/figure3.gph"
*additional editing for gender and party labels in graph editor (women, then men on grpaxis; democrats then republicans on supaxis)

*Figure 5 - Tourism
*favor_oppose_tourismbrian =he's saying rep should be required
*favor_oppose_tourismsusan = she's saying rep should be required

graph bar (mean) favor_oppose_tourismbrian (mean) favor_oppose_tourismsusan, ///
over(gender2) over(party_dichotomous) ascategory asyvars bar(1, fcolor(navy*.3)) bar(2, fcolor(maroon*.7)) bargap(1.0) ///
legend(order(1 "Brian in Favor" 2 "Susan in Favor")) ///
ytitle(Support for Industry Rep. on Tourism Board) ylabel(, valuelabel)
graph save Graph "/Users/georgianilsson/Desktop/Vanderbilt/RA/RA Amanda/Voice Project/Replication Files/figure5.gph"
*additional editing for gender and party labels in graph editor (women, then men on grpaxis; democrats then republicans on supaxis)

}


